package com.cryptoneedle.garden.service.crud.garden.doris;

import com.cryptoneedle.garden.entity.garden.mapping.MappingColumn;
import com.cryptoneedle.garden.entity.garden.mapping.MappingTable;
import com.cryptoneedle.garden.enums.MappingFieldType;
import com.cryptoneedle.garden.repository.garden.ads.AdsColumnRepository;
import com.cryptoneedle.garden.repository.garden.ads.AdsTableRepository;
import com.cryptoneedle.garden.repository.garden.doris.DorisCatalogRepository;
import com.cryptoneedle.garden.repository.garden.doris.DorisColumnRepository;
import com.cryptoneedle.garden.repository.garden.doris.DorisDatabaseRepository;
import com.cryptoneedle.garden.repository.garden.doris.DorisTableRepository;
import com.cryptoneedle.garden.repository.garden.dwd.DwdColumnRepository;
import com.cryptoneedle.garden.repository.garden.dwd.DwdTableRepository;
import com.cryptoneedle.garden.repository.garden.mapping.MappingColumnRepository;
import com.cryptoneedle.garden.repository.garden.mapping.MappingJoinRepository;
import com.cryptoneedle.garden.repository.garden.mapping.MappingTableRepository;
import com.cryptoneedle.garden.repository.garden.ods.OdsColumnRepository;
import com.cryptoneedle.garden.repository.garden.ods.OdsColumnTranslateRepository;
import com.cryptoneedle.garden.repository.garden.ods.OdsTableRepository;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-11-13
 */
@Slf4j
@Service
@Transactional
public class PatchDorisService {

    @Autowired
    private FoundDorisService select;
    @Autowired
    private AddDorisService add;
    @Autowired
    private PatchDorisService patch;
    @Autowired
    private SaveDorisService save;
    @Autowired
    private DeleteDorisService delete;

    @Resource
    private DorisCatalogRepository dorisCatalogRepository;
    @Resource
    private DorisDatabaseRepository dorisDatabaseRepository;
    @Resource
    private DorisTableRepository dorisTableRepository;
    @Resource
    private MappingTableRepository mappingTableRepository;
    @Resource
    private OdsTableRepository odsTableRepository;
    @Resource
    private DwdTableRepository dwdTableRepository;
    @Resource
    private AdsTableRepository adsTableRepository;
    @Resource
    private DorisColumnRepository dorisColumnRepository;
    @Resource
    private MappingColumnRepository mappingColumnRepository;
    @Resource
    private OdsColumnRepository odsColumnRepository;
    @Resource
    private DwdColumnRepository dwdColumnRepository;
    @Resource
    private AdsColumnRepository adsColumnRepository;

    @Resource
    private MappingJoinRepository mappingJoinRepository;
    @Resource
    private OdsColumnTranslateRepository odsColumnTranslateRepository;

    /**
     * DorisCatalog
     */

    /**
     * DorisDatabase
     */

    /**
     * DorisTable
     */

    /**
     * MappingTable
     */
    public void mappingTableSetMappingTableFlag(MappingTable mappingTable, boolean mappingTableFlag) {
        mappingTable.setMappingTableFlag(mappingTableFlag);
        save.save(mappingTable);
    }

    /**
     * OdsTable
     */

    /**
     * DwdTable
     */

    /**
     * AdsTable
     */

    /**
     * DorisColumn
     */

    /**
     * MappingColumn
     */
    public void mappingColumnSetMappingFieldType(MappingColumn mappingColumn, MappingFieldType mappingFieldType) {
        mappingColumn.setMappingFieldType(mappingFieldType);
        save.save(mappingColumn);
    }

    /**
     * OdsColumn
     */

    /**
     * DwdColumn
     */

    /**
     * AdsColumn
     */
}